package team3.photoBrowser.flickr;

import java.util.LinkedList;


import android.annotation.SuppressLint;

@SuppressLint({ "ParserError", "ParserError" })
public class FlickrHandler { //this class will use the SAX and DOM parsers
	SAXHandler saxHandler;
	DOMHandler domHandler;
	
	public FlickrHandler(){
		domHandler = new DOMHandler();
		saxHandler = new SAXHandler(domHandler);
	}
	//calls the SAX Parser and returns a list of FlickrPhotoInfo elements (containing the photos' URL)
	//it gives the domHandler as a parameter to avoid having to create multiple instances of it.
	public LinkedList<FlickrPhotoInfo> getPhotoList(float minLongitude, float minLatitude, float maxLongitude, float maxLatitude){
		return saxHandler.readPhotoUrlList(minLongitude, minLatitude, maxLongitude, maxLatitude);
	}
	
}
